home *** CD-ROM | disk | FTP | other *** search
/ Larry Magid's Essential Internet / Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO / qsockpro.qip / I_ONRAMP.MPS < prev    next >
Text File  |  1995-10-09  |  1KB  |  64 lines

  1. # Internet On-Ramp PPP and SLIP login script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # 5-9-95
  4.  
  5. STRING username
  6. STRING password
  7. STRING framing
  8. STRING IPAddress
  9.  
  10. SetTimeOut  120
  11. CfgGetValue "Username" username
  12.  
  13. IF result = 0 THEN
  14.     GetInput "Enter your username:" username
  15.     IF result = 0 THEN
  16.         PRINT "Warning, no username entered."
  17.     ELSE
  18.         PRINT "Username set to: ";username
  19.     ENDIF
  20. ENDIF
  21.  
  22. CfgGetValue "Password" password
  23.  
  24. IF result = 0 THEN
  25.     GetPassword "Enter your password:" password
  26.     IF result = 0 THEN
  27.         PRINT "Warning, no password entered."
  28.     ELSE
  29.         PRINT "Password set."
  30.     ENDIF
  31. ENDIF
  32.  
  33. CfgGetValue "Framing" framing
  34.  
  35. IF result = 0 THEN
  36.     ABORT "Can't read 'Framing' setting from QDECK.INI."
  37. ENDIF
  38.  
  39. CommWaitFor "login:"
  40.  
  41. IF framing = "MPPPP" THEN
  42.     CommSend "P"        # Specify PPP
  43. ELSE
  44.     CommSend "S"
  45. ENDIF
  46.  
  47. CommSend username
  48. CommSend "%r"
  49.  
  50. CommWaitFor "password:"
  51.     CommSend password
  52.     CommSend "%r"
  53.  
  54. CommWaitFor    "to"
  55. CommReadIPAddr IPAddress
  56.  
  57. IF result < 7 THEN        # IP Address length test
  58.     ABORT "Invalid IP Address"
  59. ENDIF
  60.  
  61. CfgSetValue "IPAddress" ipaddress
  62.  
  63. END
  64.